<template>
  <div>
    <van-address-list
      v-model="chosenAddressId"
      :list="list"
      :disabled-list="disabledList"
      default-tag-text="默认"
      @add="onAdd"
      @edit="onEdit" 
    />


  </div>
</template>

<script>
export default {
  data() {
    return {
      chosenAddressId: "1",
      list: [
        {
          id: "",
          name: "",
          tel: "",
          address: "",
          isDefault: true,
        },
      ],
    };
  },
  mounted() {
    this.list111()
  },

  methods: {
    list111(){
      alert('111')
      axios.get('/index/add_orders').then((resp) => {
        if (resp.data.code==200){
          console.log('22111',resp)
        }
      })
    },
    onAdd() {
        this.$router.push('/newadd')
    },
    onEdit(item, index) {
      Toast("编辑地址:" + index);
    },
  },
};
</script>

<style></style>
